
<script lang="ts" setup>
import { ref } from 'vue'
import type { Ref } from 'vue'
import img from "@/assets/bieshu.jpg"


let flag = ref(false)
function onFocus(e: any) {
    flag.value = true
}

const test = ref('')
function oncancel() {
    test.value = ''
}


</script>

<template>
    <div>
        <van-nav-bar title="收藏夹" left-text="返回" left-arrow @click-left="$router.back()" />
    </div>
    <div class='container'>
        <form action="/">
            <van-search :v-model="test" :show-action="flag" action-text="x" placeholder="搜索" @focus="onFocus($event)"
                @cancel="oncancel" />
        </form>

        <van-swipe-cell>
            <van-card price="600" desc="珠海.3居3床6人.123平米" title="拱北华山别墅" class="goods-card"
                :thumb="img">
                <template #footer>
                    <van-button plain hairline size="small">删除</van-button>
                </template>
            </van-card>

        </van-swipe-cell>
    </div>
</template>

<style lang="scss" scoped>
.van-swipe-cell{
    position: relative;
}

.van-button{
    position: absolute;
    top: 70px;
    right: 10px;
}
</style>

